<!--
 * @Description: 
 * @Author: lwx
 * @Date: 2021-11-16 16:17:27
 * @LastEditors: lwx
 * @LastEditTime: 2023-02-24 10:58:52
-->
<template>
    <Chart :cdata="cdata"></Chart>
</template>

<script>
import Chart from './chart.vue'
import {timerMixins} from '@/common/mixins/timerMixins.js'
import {dailyOutput} from '@/api/dashboard.js'
export default {
  name: 'index',
  mixins:[timerMixins],
  components:{
      Chart
  },
  data() {
      return {
          cdata:[]
      }
  },
  methods:{
   async initData(){
    const {data}= await dailyOutput()
    this.cdata=[]
    data.good=data.good.substr(0,data.good.length-1)
    let actual=data.number+data.ng //实际=良品+不良品
    this.cdata.push(data.amount,actual,data.number,data.ng,data.good)
   }
  }
}
</script>

<style lang = "scss" scoped>

</style>
